From: Michael R. Crusoe Date: Wed, 12 Feb 2025 00:58:32 +0000 (+0000) Subject: Link against the packaged version of libpcre2 X-Git-Tag: archive/raspbian/0.6.0+ds-1+rpi1~2 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com//%22mailto:1989.gaurav%40gmail.com/%22/%22http:/www.example.com/%22mailto:1989.gaurav%40gmail.com/%22?a=commitdiff_plain;h=e158643afcc9083bd8a2b14fe10a22e4f50137da;p=python-pcre2.git Link against the packaged version of libpcre2 Instead of the code copy. Gbp-Pq: Name packaged_libpcre2 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 1b59b31..4134602 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,7 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON) set(CMAKE_C_STANDARD 99) -set(PCRE2_INCLUDE_DIR ${CMAKE_BINARY_DIR}/src/libpcre2) +set(PCRE2_INCLUDE_DIR /usr/include) set(CYTHON_EXTRA_COMPILE_ARGS -DPCRE2_CODE_UNIT_WIDTH=8 -fPIC) # Set PCRE2 options. @@ -15,11 +15,6 @@ set(PCRE2_NEVER_BACKSLASH_C ON CACHE BOOL "" FORCE) # Always make a release build. set(CMAKE_BUILD_TYPE Release) -# Build PCRE2 library as both shared and static. -set(BUILD_STATIC_LIBS ON) -set(BUILD_SHARED_LIBS ON) -add_subdirectory(src/libpcre2) - # Build Cython code as shared. set(BUILD_STATIC_LIBS OFF) set(BUILD_SHARED_LIBS ON) diff --git a/src/pcre2/CMakeLists.txt b/src/pcre2/CMakeLists.txt index 38c117e..3188e07 100644 --- a/src/pcre2/CMakeLists.txt +++ b/src/pcre2/CMakeLists.txt @@ -12,7 +12,7 @@ macro(add_pyx_file filename) add_library(${filename} MODULE ${filename}) python_extension_module(${filename}) - target_link_libraries(${filename} pcre2-8-static) + target_link_libraries(${filename} pcre2-8) target_include_directories(${filename} PRIVATE ${PCRE2_INCLUDE_DIR}) target_compile_options(${filename} PRIVATE ${CYTHON_EXTRA_COMPILE_ARGS}) @@ -50,4 +50,4 @@ install( utils.pyx DESTINATION src/pcre2 -) \ No newline at end of file +)